
#include "stdafx.h"
#include "pf_staticgraphicview.h"

#include "pf_graphic.h"


/**
 * Constructor.
 *
 * @param w Width
 * @param h Height
 */
PF_StaticGraphicView::PF_StaticGraphicView(int w, int h, PF_Painter* p) {
    setBackground(PF_Color(255,255,255));
    width = w;
    height = h;
    painter = p;
    setBorders(5, 5, 5, 5);
}


/**
 * Destructor
 */
PF_StaticGraphicView::~PF_StaticGraphicView() {}


/**
 * @return width of widget.
 */
int PF_StaticGraphicView::getWidth() {
    return width;
}


/**
 * @return height of widget.
 */
int PF_StaticGraphicView::getHeight() {
    return height;
}





/**
 * Handles paint events by redrawing the graphic in this view.
 */
void PF_StaticGraphicView::paint() {
    PF_DEBUG->print("PF_StaticGraphicView::paint begin");
    // drawIt();
    redraw(LX_Define::RedrawAll);
    PF_DEBUG->print("PF_StaticGraphicView::paint end");
}

